<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[rules]" value="" />
    <div class="form-group" style="display:none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parent')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[pid]', $groupdata, $row['auth_group']['pid'], ['class'=>'form-control selectpicker', 'data-rule'=>'required', 'data-id'=>$row['auth_group']['id'], 'data-pid'=>$row['auth_group']['pid']])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><text class="reqtip">*</text>{:__('Logo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-logo" data-rule="required" class="form-control" size="50" name="row[logo]" type="text" value="{$row.logo|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-logo" class="btn btn-danger faupload" data-params='{"category":1}' data-input-id="c-logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-logo" class="btn btn-primary fachoose" data-params='{"category":1}' data-input-id="c-logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-logo"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-logo"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="name" name="row[name]" value="{$row.name}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('联系方式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="phone" name="row[phone]" value="{$row.phone}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('地区')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='control-relative'>
                <input id="c-city" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value="{$row.city}" />
            </div>
        </div>
    </div>
    <input type="hidden" name="row[code]" id="code" value="{$row.code}" />
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详细地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="address" name="row[address]" value="{$row.address}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-intro"  class="form-control" rows="5" name="row[intro]" cols="50">{$row.intro}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Permission')}:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><small>{:__('Check all')}</small></label></span>
            <span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><small>{:__('Expand all')}</small></label></span>

            <div id="treeview"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
